package com.paobuji.aidebao.myapplication.service;

public interface CalcDisImpl {
	/**
	 * An代表距离为1m时，RSSI值 
	 */
	public final static double A = 62.0;
	public final static double A0 = 70.0;
	public final static double A1 = 40.2;

	public final static double G = 5.34;
	public final static double F = 4.34;
	public final static double H = 5.0;
	public final static double M = 5.1;
	/**
	 * Bn代表指数分母
	 */
	public final static double B = 45.0;
	public final static double B1 = 21.5;
	public final static double B2 = 25;
	public final static double B3 = 50;
	public final static double B4 = 60;
	public final static double B5 = 70;
	public final static double B6 = 80;
	public final static double B7 = 90;
	public final static double B8 = 100;
	public final static double B9 = 110;
	public final static double B10 = 120;
	public final static double B11 = 130;
	public final static double B12 = 140;
	/**
	 * RSSI过滤系数
	 */
	public final static double u = 0.8;
	/**
	 * 计算
	 * @param rssi
	 * @return 计算后的距离
	 */
	public String dis(Integer rssi);
	/**
	 * 过滤RSSI
	 * @param rssi
	 * @return 过滤后的RSSI
	 */
	public Integer gl(Integer rssi);
	/**
	 * 通过RX求解距离
	 * @param rx
	 * @return
	 */
	public String disO(Integer rx);
	/**
	 * 求解RX
	 * @param rssi
	 * @return
	 */
	public Integer rx(Integer rssi);
}
